/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */
#pragma once

#include <boost/scoped_ptr.hpp>
#include "AbstractSequence.h"

namespace liba {
namespace lib3d {
namespace anim2d {

class SpanSequence : public AbstractSequence
{
public:
	SpanSequence();
	SpanSequence(const SpanSequence &rhs);

	virtual void render_to_list(hard::Hardware * hardware, hard::RenderTexture * render_texture, unsigned frame_number);
	virtual size_t get_frames_count() const;
	virtual AbstractSequence* clone() const;

	virtual std::string GetType() const
	{
		return "SpanSequence";
	}
protected:
	virtual void load_image(const std::string & image_name);
	virtual bool on_attribute( xml::Provider * prov, const std::string & name, const std::string & value );
	virtual void on_save_attributes(xml::SaverBase * saver) const;
private:
	boost::scoped_ptr<material::TextureSequence> tex_sequence;
	unsigned total_frames_count;
};

} // namespace anim2d
} // namespace lib3d
} // namespace liba
